<template>
  <div class="regional-analysis">
    <div class="title">
      <span>综合查询</span>
      <span class="logo">
        <el-tooltip class="item" effect="dark" content="菜单" placement="bottom">
          <i class="iconfont icon-hanbao" @click="contentVisible = !contentVisible"></i>
        </el-tooltip>
      </span>
    </div>
    <div class="tree-content" v-show="contentVisible">
      <TimeDimension></TimeDimension>
    </div>
  </div>
</template>

<script>
  import { mapState, mapMutations } from "vuex";
  import sgisRegionBase from "@/utils/map/sfgis.region.base.js";
  import sgisMapBase from "@/utils/map/sfgis.map.base.js";
  import Layer from "@/utils/map/lib/main.js"; // 专题图层绘画函数
//  import searchresultData from "./searchresult.data.js";
//  import config from "static/config/app-config.js";
  import axios from "axios";
//  import { setTimeout } from "timers";

  import TimeDimension from "../regionanalysis/TimeDimension.vue";

  export default {
    name: "regional-analysis-panel",
    components: {
      TimeDimension
    },
    data() {
      return {
        contentVisible:false,//控制左边面板显示
      };
    },
    computed: {
      ...mapState({
//        showmacroqueryall: state => state.spatialquery.showmacroqueryall
      })
    },
    watch: {
      contentVisible() {
        if (!this.contentVisible) {
          this.style = {
            height: "60px"
          };
        } else {
          this.style = {
            height: "100%"
          };
        }
        this.$emit("querystyle", this.style);
      }
    },
    mounted() {
//      EventBus.$on("highLightResLi", this.highLightResLi);
//      EventBus.$on("updateRegions", this.updateRegions);
//      EventBus.$on("changeTabHandle", this.changeTabHandle);
//      EventBus.$on("peripherySearch", this.peripherySearch);
    },
    beforeDestroy() {
//      EventBus.$off("highLightResLi", this.highLightResLi);
//      EventBus.$off("updateRegions", this.updateRegions);
//      EventBus.$off("changeTabHandle", this.changeTabHandle);
//      EventBus.$on("peripherySearch", this.peripherySearch);
    },
    methods: {
//      ...mapMutations(["changeshowmacroqueryall"]),

    }
  };
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  @import "../css/rule.scss";
  .regional-analysis {
    width: 302px;
    height: 100%;
    box-sizing: border-box;
    .logo {
      float: right;
      height: 60px;
      line-height: 60px;
      width: 50px;
      background-color: $backGroundColor;
      color: $fontColor;
      .icon-hanbao{
        cursor: pointer;
      }
    }
    .title {
      font-size: $fontSizeNav;
      color: $fontColor;
      font-weight: bold;
      text-align: center;
      height: 60px;
      line-height: 60px;
      background-color: $backGroundColor;
      box-shadow: 2px 5px 5px rgba(0, 0, 0, 0.3);
    }
    .tree-content {
      height: calc(100% - 60px);
      width: 100%;
      overflow: auto;
      // background-color: $backGroundColorDeep;
      -webkit-box-shadow: 2px 5px 5px rgba(0, 0, 0, 0.3);
      box-shadow: 2px 5px 5px rgba(0, 0, 0, 0.3);
      background: #10708985;
    }
  }
</style>

